Skip to content

Make seed part of config and pass into recheck data#482

Merged
moodmosaic merged 3 commits into
hedgehogqa:masterfrom
njlr:feature/issue-450
May 10, 2026
Merged

Make seed part of config and pass into recheck data#482
moodmosaic merged 3 commits into
hedgehogqa:masterfrom
njlr:feature/issue-450

Conversation

@njlr
Copy link
Copy Markdown
Contributor

@njlr njlr commented Mar 23, 2026

  • Adds the type SeedConfig for defining starting seed configuration
  • Extends IPropertyConfig with a SeedConfig
  • Adds helpers for setting the SeedConfig in a IPropertyConfig
  • Uses SeedConfig to set initial RecheckData in reportWith
  • Fixes seed in PropertyConfig.defaults
  • Adds a snapshot test for determinism

Relates to #450

Copy link
Copy Markdown
Member

@moodmosaic moodmosaic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR!

The core feature is a good addition, but the default should be RandomSeed to preserve existing behavior. The withSeed API lets users opt into determinism explicitly, which is the right trade-off for a property testing library.

Comment thread tests/Hedgehog.Tests/GenTests.fs
Comment thread src/Hedgehog/PropertyConfig.fs Outdated
Comment thread src/Hedgehog/Property.fs
Copy link
Copy Markdown
Member

@moodmosaic moodmosaic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @njlr 👍 This is in good shape to merge.

@moodmosaic moodmosaic merged commit 681712e into hedgehogqa:master May 10, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants